-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BaseVaultTest refactoring #1196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such a big diff I might have missed something, but looks good. Could perhaps have done the lifecycle stuff separately as a small PR, but I guess it's fine
@@ -75,19 +75,19 @@ contract BigPoolDataTest is BaseVaultTest { | |||
vm.stopPrank(); | |||
} | |||
|
|||
function _approveForSender() internal { | |||
function _approveNewPoolForSender() internal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several similar functions here that are identical except for the target of the loop. Consider factoring it out into BaseVaultTest
(maybe with an argument for the array). For instance, BigWeightedPool.t.sol's _approvePoolTokensForSender
/ _approvePoolTokensForPool
; and here _approveNewPoolForSender
/ _approveForNewPool
Co-authored-by: EndymionJkb <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, makes sense!
Agree with this comment too: https://github.com/balancer/balancer-v3-monorepo/pull/1196/files#r1896319207
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
This PR makes variables that are used as constants actually constant and also adds some hooks for more flexible lifecycle customization.
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution